<template>
	<div>
		<h2>TestProvideInject</h2>
		<h3>inject普通用法数据：{{ test }}</h3>
		<h3>inject函数用法数据：{{ fnObj().fn2() }}</h3>
		<h3>inject默认值：{{ defaultValue }}</h3>
	</div>
</template>
<script lang="ts" setup>
import { inject, onMounted } from "vue";
const test = inject("test");
const fnObj = inject("fnObj");
const defaultValue = inject("default", "默认值");
onMounted(() => {
	const fns = fnObj();
	console.log(fns);
});
</script>
